home *** CD-ROM | disk | FTP | other *** search
/ Flybox Trout (Edition 1) / Flybox Trout (Edition 1).iso / Setup / Support / FlyBox.exe / FlyBox.dxr / 00019_SignUp.ls < prev    next >
Encoding:
Text File  |  2002-04-15  |  2.5 KB  |  49 lines

  1. property First_Name, Surname, Address, EMail, AffiliationID, AffiliationPassword, Receive_Info, Trusted, Cookie, theNetID
  2. global DBPath
  3.  
  4. on exitFrame me
  5.   if voidp(theNetID) or (theNetID = 0) then
  6.     First_Name = getVariable(sprite(1), "FirstName")
  7.     Surname = getVariable(sprite(1), "Surname")
  8.     Address = getVariable(sprite(1), "Address")
  9.     EMail = getVariable(sprite(1), "EMail")
  10.     Password = getVariable(sprite(1), "Password")
  11.     AffiliationID = getVariable(sprite(1), "AffiliationID")
  12.     AffiliationPassword = getVariable(sprite(1), "AffiliationPassword")
  13.     Receive_Info = getVariable(sprite(1), "ReceiveInfo")
  14.     Trusted = getVariable(sprite(1), "Trusted")
  15.     Cookie = getVariable(sprite(1), "Cookie")
  16.     theStr = "http://66.155.19.43/members/MemberDetails.asp?" & urlEncode([#First_Name: First_Name, #Surname: Surname, #Address: Address, #EMail: EMail, #AffiliationID: AffiliationID, #AffiliationPassword: AffiliationPassword, #Receive_Info: Receive_Info, #Trusted: Trusted.value, #Cookie: Cookie.value, #Password: Password])
  17.     theNetID = getNetText(theStr)
  18.   end if
  19.   if netDone(theNetID) then
  20.     if netTextresult(theNetID) <> EMPTY then
  21.       db = DGOpenDatabase(DBPath & "FlyBox.mdb", 0, 0, ";PWD=StopLooking")
  22.       Password = netTextresult(theNetID)
  23.       setVariable(sprite(1), "Password", Password)
  24.       DGExecute("UPDATE Registration SET FirstName = '" & CheckQuotes(First_Name) & "', Surname = '" & CheckQuotes(Surname) & "', Address = '" & CheckQuotes(Address) & "', EMail = '" & CheckQuotes(EMail) & "', Password = '" & CheckQuotes(Password) & "', AffiliationID = '" & CheckQuotes(AffiliationID) & "', AffiliationPassword = '" & CheckQuotes(AffiliationPassword) & "', ReceiveInfo = " & Receive_Info.value & ", Trusted = " & Trusted.value & ", StoreCookie = " & Cookie.value, db)
  25.       DGClose(db)
  26.       alert("Your details have been updated successfully.")
  27.     else
  28.       alert("There has been a problem contacting the Flybox web-site. Please ensure that:" & RETURN & RETURN & "1. You are connected to the Internet." & RETURN & "2. If you are behind a firewall that you have permissions to access the Internet.")
  29.     end if
  30.     theNetID = VOID
  31.     setVariable(sprite(1), "Finished", "T")
  32.     go("Finished")
  33.   else
  34.     go(the frame)
  35.   end if
  36. end
  37.  
  38. on CheckQuotes theString
  39.   num = length(theString)
  40.   repeat with i = 1 to num
  41.     if theString.char[i] = "'" then
  42.       NewString = NewString & "''"
  43.       next repeat
  44.     end if
  45.     NewString = NewString & theString.char[i]
  46.   end repeat
  47.   return NewString
  48. end
  49.